package com.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;
import java.util.List;


/**
 * @author 李浩然
 * @version 1.0
 * @description: TODO
 * @date 2022/11/19 10:59
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("commented_info")
public class Comment {
    private Integer cId;
    private String content;
    private String username;
//    private Integer userId;
    private String target;
    private Integer pid;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createtime;
    private Integer likeNum;
    private  String avatarUrl;
    private  String imgUrl;
    //下面的注解表示该字段在数据库中并不存在，额外添加的
    @TableField(exist = false)
    private List<Comment> children;
}
